using System;
using Abp.Domain.Entities;
using MongoDB.Bson.Serialization.Attributes;

namespace Batman.Jianbei.Forum.Core.Domains.Socials
{
    public class Access : Entity<string>
    {
        /// <summary>
        /// 访问者(微信用户ID)
        /// </summary>
        public string AccessBy { get; set; }

        /// <summary>
        /// 访问的帖子
        /// </summary>
        public string PostId { get; set; }

        /// <summary>
        /// 访问时间
        /// </summary>
        public DateTime AccessAt { get; set; }

        public Access()
        {
        }

        public Access(string postId, string accessBy)
        {
            AccessBy = accessBy;
            PostId = postId;
            AccessAt = DateTime.Now;
        }

        public Access(string postId, string accessBy, DateTime accessAt) : this(postId, accessBy)
        {
            AccessAt = accessAt;
        }
    }
}